﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.DataVisualization.Charting;
using System.ComponentModel;

namespace HackersDiet
{
    public class MyTreeNode : TreeNode
    {
        private SeriesManipulatorCollection manipulators = new SeriesManipulatorCollection();
        private Series nodeSeries = null;

        #region Constructors

        public MyTreeNode(Series s)
            : base(s.Name)
        {
            this.Name = s.Name;
            this.nodeSeries = s;
            //this.SeriesManipulators.Add(new ActualSeriesManipulator());
            //this.SeriesManipulators.Add(new AverageSeriesManipulator());
        }

        #endregion

        #region Accessors

        public SeriesManipulatorCollection SeriesManipulators
        {
            get
            {
                return this.manipulators;
            }
        }

        #endregion

        #region Methods

        public void GenerateChildNodes()
        {
            //foreach (ISeriesManipulator ism in this.manipulators)
            //{
            //    IList<Series> subSeries = ism.Manipulate(Plugin.HDControl.Chart, null, (Series)this.Tag);

            //    foreach (Series s in subSeries)
            //    {
            //        MyTreeNode tn = new MyTreeNode(s);
            //        this.Nodes.Add(tn);
            //    }
            //}
        }

        #endregion
    }
}
